On one of pyxc_domain_getinfo's error paths, free the block allocated
previously. This would have caused a memory leak when attempting to get info
on a domain that does not exist.
domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The
underlying xc_domain_setmaxmem already took an unsigned int, and
PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way
that longer values would get through here in any case. Fixing the documentation
and the local variable is the best solution, until someone decides that we need
to support maxmem values greater than 2TiB.
Add support to build arch/ia64 xen kernels, also add pre/post link hooks in mkbuildtree. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Add 64 bit support to the VTPM Tools plus do some minor cleanups.
The VTPM manager and VTPMs fully support both 32 and 64 bit OSes. The
tpm_emulator (provided for debugging on TPM-less machines) does not
support 64-bit kernels by default though. See the README for details on
how to use it on 64-bit kernels.
Dynamically generate the local apic entries in ACPI MADT table.
The number of local apic entries is decided by the #vcpus passed
from the config file (eg./etc/xen/xmexample.vmx).
This feature is required by the SMP VMX domain.
Signed-off-by: Ke Yu <ke.yu@intel.com> Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
Fire watches once immediately upon registration.
It matches the model of programming used to avoid races with watches,
and also makes re-establishing watches on daemon restart easier. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Remove iflag argument to xs_write
xs_write with O_CREAT|O_EXCL causes problems over daemon restarts, since
it's not idempotent.
It turns out noone really needs the flags word at all, so get rid of it.
It's now as if everyone specified "O_CREAT". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Make xs_mkdir an xs_rm idempotent.
When modifying libxenstore to transparently restart when the daemon dies,
it became apparent that life is simpler when all commands can simply be
restarted. So this patch makes a slight semantic change to xs_rm and xs_mkdir:
xs_rm now succeeds if the file doesn't exist (as long as the parent exists),
and xs_mkdir succeeds if the directory already exists.
Noone should notice. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Don't do device create on domain recreate.
Also don't add XendDomainInfo object to XendDomain dictionary from
XendDomainInfo object but do it in XendDomain. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Fix VMX domains not cleaning up properly, since some page refncts are
not zero. One reason for this is that in function shadow_set_l1e(),
before calling function shadow_update_min_max(), one should call
__shadow_get_sl2e() again, since the sl2 entry may be changed.
Signed-off-by: Xin Xiaohui <Xiaohui.xin@intel.com> Signed-off-by: Li Chengyuan <Chengyuan.li@intel.com>
The domain structure maintains several shadow mode stats,
such as shadow page counts for l1 & l2, hl2 tables, snapshots,
etc. These counts are not decremented properly when we
free shadow pages. The following patch fixes this problem.
Changed dangerous default parameter values where used to use None instead.
Renamed variables type and ord since these clash with built-in names. Renamed
unused variables to mark them as such. Changed scheduler.py to use *args and
**kwargs rather than the strange non-idiomatic imitation of the same.
Remove the complexity of the config_handlers mechanism in favour of a simple
configure_maxmem method. The config_handlers mechanism was trying to be a
general configuration-registration framework, but that functionality was
unused and confusing.
Replaced the device handling mechanism used by XendDomainInfo. Superficially,
this looks like the resurrection of DevController from controller.py, but the
mechanism is actually very different. Device handling is now stateless inside
xend, relying on the store for state management, reducing DevController
instances to one-shot lifetimes. Dev and its subclasses have gone completely.
The device creation code itself has moved from XendDomainInfo.createDevice into
DevController subclasses, and the previous contents of the subclasses has been
discarded (these subclasses were no longer being called, so all this code was
dead).
XendDomainInfo.getDeviceIds has gone, as it was unused.
XendDomainInfo.delete_device has been subsumed by XendDomainInfo.destroyDevice;
since device handling is now stateless inside xend, the distinction between
device 'deletion' and device 'destruction' is meaningless.
The s-expression describing devices has gone, as this information is no longer
available to xend in the same way, and seems to be unused. If it is required,
it can be reinstated by loading device information from Xen or the store.
Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
In all cases, move the creation of a new transaction outside of the block
handling exceptions raised inside that transaction. If the creation (start) of
the transaction fails, then t has not been assigned, and in any case no
transaction has been created, so it is wrong to attempt to abort that
(non-existent) transaction.
Replace XendDomainInfo.setStoreChannel with XendDomainInfo.closeStoreChannel.
setStoreChannel was only ever called with channel=None (implying that the
current channel would be closed) so the other code there was superfluous.
Added getVCpuCount to XendDomainInfo and use that and getName, getDomain,
getTargetMemory inside image.py to decouple the latter from the internals of
the former. Move the definition of xc inside image.py to please pylint.
Added getTargetMemory, getSsidref methods to XendDomainInfo, and use these and
getDomain, getName in SrvDomainDir, to decouple the latter from the internals of
the former, in preparation for changes internal to XendDomainInfo.
Added _1,.._5 to dummy-variables, so that we can specify multiple unused
parameters in our code. Removed map and filter from bad-functions - I don't
think that we have any problem with functional programming styles!
Make dom0_enforce_cpus() use vcpu_hotplug rather than directly modifying the sysfs entries.
Directly modifying the sysfs entries causes the xenstore state of
a cpu's availability to be incorrect. Also slightly modify the
dom0-cpus description in the xend-config. Rather than specifying which
dom0 vcpus are to be used, it is now a target of how many vcpus to use
as pinvcpu ops are the preferred method for setting which physical cpu a
vcpu uses. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Fix the control panel problem.
The new image handling structure broke the vmx guest loading. Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Grant-refrence allocation pools and tracking tables should be
per interface in netfront, not global. This fixes various
bug reports including Bugzilla #183.
direct_remap_pfn_range() takes a vm_area_struct rather than
an mm_struct. Also it sets VM_RESERVED and VM_IO, just like
generic remap_pfn_range() in mm/memory.c.
Start cleaning up grant tables. gnttab_donate now called
gnttab_transfer, with slightly rationalised interface and
simpler implementation inside Xen. This is a tiny chip off
the tip of a very big iceberg. :-)
add support for ipv6 address in choose_vnc_display function
getting the port from the latest field, not the first one.
fix suggested by Nickolai Zeldovich. close bug #231
Signed-off-by: Vincent Hanquez <vincent@xensource.com>